package com.freedom.sql.jdbc.bind;

import java.util.ArrayList;

public class Bind {
	private String logicDB;
	private String logicTable;
	private ArrayList<Link> readList;
	private ArrayList<Link> writeList;

	public Bind(String _logicDB, String _logicTable, ArrayList<Link> _readList, ArrayList<Link> _writeList) {
		logicDB = _logicDB;
		logicTable = _logicTable;
		readList = _readList;
		writeList = _writeList;
	}

	public String getLogicDB() {
		return logicDB;
	}

	public void setLogicDB(String logicDB) {
		this.logicDB = logicDB;
	}

	public String getLogicTable() {
		return logicTable;
	}

	public void setLogicTable(String logicTable) {
		this.logicTable = logicTable;
	}

	public ArrayList<Link> getReadList() {
		return readList;
	}

	public void setReadList(ArrayList<Link> readList) {
		this.readList = readList;
	}

	public ArrayList<Link> getWriteList() {
		return writeList;
	}

	public void setWriteList(ArrayList<Link> writeList) {
		this.writeList = writeList;
	}

	public String toString() {
		StringBuilder sBuilder = new StringBuilder();
		sBuilder.append("[");
		sBuilder.append(logicDB);
		sBuilder.append("-");
		sBuilder.append(logicTable);
		sBuilder.append("]\n");
		sBuilder.append("readList:\n");
		for (Link link : readList) {
			sBuilder.append(link.toString());
		}
		sBuilder.append("\nwriteList:\n");
		for (Link link : writeList) {
			sBuilder.append(link.toString());
		}
		return sBuilder.toString();
	}

}
